//this file includes all the port definitions
//use these names when addressing ports. DO NOT ADDRESS THEM WITH NUMBERS DIRECTLY!

//PORT1
#define GPS_1ppsIn		(0x01)	//the GPS 1PPS input (when GPS used)
#define GPS_StrobeIn	(0x02)	//the GPS strobe input (when GPS used)
#define Serv1PWMOut		(0x04)	//PWM output for Servo 1
#define Serv2PWMOut		(0x08)	//PWM output for Servo 2

//PORT2
#define MagDatRdy		(0x02)	//data ready indicator from magnetometer
#define MagRst			(0x04)	//line to reset magnetometer
#define PresDatRdy		(0x08)	//data ready indicator from pressure sensor
#define SPIEnblGyroZ	(0x20)	//enable the SPI interface for the Z axis Gyro (the AD part)
#define SPIEnblAccel	(0x40)	//enable the SPI interface for the accelerometer
#define SPIEnblPres		(0x80)	//enable the SPI interface for the pressure sensor

//PORT3
#define SPIEnblMag		(0x01)	//enable the SPI interface for the magnetometer
#define SPIMoSi			(0x02)	//SPI master out, slave in data line
#define SPIMiSo			(0x04)	//SPI master in, slave out data line
#define SPIClk			(0x08)	//SPI clock line
#define UART_TxToGumstix	(0x10)	//UART data out to Gumstix Module
#define UART_RxFromGumstix	(0x20)	//UART data in from Gumstix Module
#define UART_TxToGPS	(0x40)	//UART data out to GPS Module ALSO THE DEBUG TERMINAL OUTPUT
#define UART_RxFromGPS	(0x80)	//UART data in from GPS Module ALSO THE DEBUG TERMINAL INPUT

//PORT4
#define Mot1PWMOut		(0x02)	//PWM output line to motor control 1
#define Mot2PWMOut		(0x04)	//PWM output line to motor control 2
#define Serv1PWMIn		(0x08)	//PWM input line from Receiver Ch1
#define Serv2PWMIn		(0x10)	//PWM input line from Receiver Ch2
#define Serv3PWMIn		(0x20)	//PWM input line from Receiver Ch3
#define Serv4PWMIn		(0x40)	//PWM input line from Receiver Ch4

//PORT5
//the entire port is unused

//PORT6
#define Son1In			(0x01)	//Sonar input Ch1
#define Son2In			(0x02)	//Sonar input Ch2
#define Son3In			(0x04)	//Sonar input Ch3
#define Son4In			(0x08)	//Sonar input Ch4
#define GyroX			(0x10)	//Gyro X input
#define GyroY			(0x20)	//Gyro Y input
#define GyroXYRef		(0x40)	//Gyro XY reference voltage input. Take the difference between this voltage and the input line as the signal


